<template>
  <component
    :is="type"
    :data="data"
    :options="options"
    :dispatchAction="dispatchAction"
    @handleClick="handleClick"
  ></component>
</template>

<script>
import Basic from "@/MCharts/components/bar/Basic";
import SpacecgBar from "@/MCharts/components/bar/SpacecgBar";
import ProcessBar from "@/MCharts/components/bar/ProcessBar";
import PileBar from "@/MCharts/components/bar/PileBar";
export default {
  name: "MChartsBar",
  data() {
    return {};
  },
  props: {
    data: {},
    options: {},
    type: {
      type: String,
      default: "Basic",
    },
    dispatchAction: {
      type: Object || Array,
    },
  },
  computed: {},
  components: {
    Basic,
    SpacecgBar,
    ProcessBar,
    PileBar,
  },
  mounted() {},
  methods: {
    handleClick(e) {
      this.$emit("handleClick", e);
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/MCharts/style/var.scss";
</style>
